var params = getUrlParams();

var exchCode = params.exchCode,
    symbolCode = params.symbolCode,
    codeType = params.codeType,
    decimal = getDecimal(params.scale),
    timelypath = symbol + "?exchName=" + exchCode + "&symbol=" + encodeURIComponent(symbolCode) + "&st=" + Math.random(),
    yesterdayPrice,
    ChartTimer,
    h;

$(function () {
    h = $('.main').height() - $('.main_t').outerHeight() - $('.main_m_t').outerHeight() - $('.main_b').outerHeight();
    $('#panel').height(h);

    $('.header_title').html(params.name);

    timelyPrice(true);
});


//报价牌
function timelyPrice(flag) {
    $.ajax({
        url: timelypath,
        dataType: 'jsonp',
        jsonp: "callback",
        success: function (data) {
            if (data.o.length == 0) {
                return;
            }

            var el = $('#main_t'),
                p1 = el.find('#p1'),
                p2 = el.find('#p2'),
                p3 = el.find('#p3'),
                td1 = el.find('#td1'),
                td2 = el.find('#td2'),
                td3 = el.find('#td3'),
                td4 = el.find('#td4'),
                td5 = el.find('#td5'),
                td6 = el.find('#td6'),
                dif;

            dif = toFixed((data.c[0] - data.p[0]), decimal);
            p1.html(toFixed(data.c[0], decimal));
            p2.html(dif + ',' + changeRate(data.c[0], data.p[0]) + '%');
            if (dif > 0) {
                p1.addClass('red').removeClass('green');
                p2.addClass('red').removeClass('green');
            } else if (dif < 0) {
                p1.addClass('green').removeClass('red');
                p2.addClass('green').removeClass('red');
            }

            //最高
            td3.html(toFixed(data.h[0], decimal));
            if (data.h[0] > data.p[0]) {
                td3.addClass('red').removeClass('green');
            } else if (data.h[0] < data.p[0]) {
                td3.addClass('green').removeClass('red');
            }

            //最低
            td4.html(toFixed(data.l[0], decimal));
            if (data.l[0] > data.p[0]) {
                td4.addClass('red').removeClass('green');
            } else if (data.l[0] < data.p[0]) {
                td4.addClass('green').removeClass('red');
            }

            //买入
            td5.html(toFixed(data.b[0], decimal));
            if (data.b[0] > data.p[0]) {
                td5.addClass('red').removeClass('green');
            } else if (data.b[0] < data.p[0]) {
                td5.addClass('green').removeClass('red');
            }

            //卖出
            td6.html(toFixed(data.se[0], decimal));
            if (data.se[0] > data.p[0]) {
                td6.addClass('red').removeClass('green');
            } else if (data.se[0] < data.p[0]) {
                td6.addClass('green').removeClass('red');
            }

            //交易时间
            p3.html(timeStamptostr(data.t[0], 'MM-dd hh:mm:ss'));

            if (flag) {
                //第一次加载

                //今开
                td1.html(toFixed(data.o[0], decimal));
                if (data.o[0] > data.p[0]) {
                    td1.addClass('red');
                } else if (data.o[0] < data.p[0]) {
                    td1.addClass('green');
                }

                //昨收
                td2.html(toFixed(data.p[0], decimal));
                yesterdayPrice = data.p[0];

                //显示分时图
                $('#nav li').eq(0).click();
            }

            setTimeout(function () {
                timelyPrice();
            }, sxtime);
        }
    });
}

//分钟切换
function ChooseKLine(el, limit, resolution, flag) {
    var _this = $(el);
    _this.siblings(".cur").removeClass("cur");
    _this.addClass("cur");

    if (ChartTimer) {
        clearTimeout(ChartTimer);
    }

    $('#panel').empty();
    if (flag) {
        SetTimelyChart(yesterdayPrice, exchCode);
    } else {
        MarketKLine(limit, resolution);
    }
}

//自动画点
function SetTimelyChart(_yrice, _exchCode) {
    Highcharts.theme = {
        xAxis: {
            gridLineWidth: 1
        }
    };
    var Digit = getDecimal(symbolCode.toUpperCase()); //小数位数
    var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
    Highcharts.setOptions({
        global: {
            useUTC: false
        },
        lang: {
            rangeSelectorZoom: '',
            months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
            shortMonths: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
            weekdays: ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
        }
    });

    var hpath = histor + "?symbol=" + encodeURIComponent(symbolCode) + "&limit=288&resolution=5&codeType=" + codeType + "&st=" + Math.random();

    $.ajax({
        url: hpath,
        dataType: 'jsonp',
        jsonp: "callback",
        success: function (data) {
            if (data.t.length == 0) {
                alert("图形暂无数据");
                return;
            }

            data = { "t": [1464220800, 1464220860, 1464220920, 1464220980, 1464221040, 1464221100, 1464221160, 1464221220, 1464221280, 1464221340, 1464221400, 1464221460, 1464221520, 1464221580, 1464221640, 1464221700, 1464221760, 1464221820, 1464221880, 1464221940, 1464222000, 1464222060, 1464222120, 1464222180, 1464222240, 1464222300, 1464222360, 1464222420, 1464222480, 1464222540, 1464222600, 1464222660, 1464222720, 1464222780, 1464222840, 1464222900, 1464222960, 1464223020, 1464223080, 1464223140, 1464223200, 1464223260, 1464223320, 1464223380, 1464223440, 1464223500, 1464223560, 1464223620, 1464223680, 1464223740, 1464223800, 1464223860, 1464223920, 1464223980, 1464224040, 1464224100, 1464224160, 1464224220, 1464224280, 1464224340, 1464224400, 1464224460, 1464224520, 1464224580, 1464224640, 1464224700, 1464224760, 1464224820, 1464224880, 1464224940, 1464225000, 1464225060, 1464225120, 1464225180, 1464225240, 1464225300, 1464225360, 1464225420, 1464225480, 1464225540, 1464225600, 1464225660, 1464225720, 1464225780, 1464225840, 1464225900, 1464225960, 1464226020, 1464226080, 1464226140, 1464226200, 1464226260, 1464226320, 1464226380, 1464226440, 1464226500, 1464226560, 1464226620, 1464226680, 1464226740, 1464226800, 1464226860, 1464226920, 1464226980, 1464227040, 1464227100, 1464227160, 1464227220, 1464227280, 1464227340, 1464227400, 1464227460, 1464227520, 1464227580, 1464227640, 1464227700, 1464227760, 1464227820, 1464227880, 1464227940, 1464228000, 1464228060, 1464228120, 1464228180, 1464228240, 1464228300, 1464228360, 1464228420, 1464228480, 1464228540, 1464228600, 1464228660, 1464228720, 1464228780, 1464228840, 1464228900, 1464228960, 1464229020, 1464229080, 1464229140, 1464229200, 1464229260, 1464229320, 1464229380, 1464229440, 1464229500, 1464229560, 1464229620, 1464229680, 1464229740, 1464229800, 1464229860, 1464229920, 1464229980, 1464230040, 1464230100, 1464230160, 1464230220, 1464230280, 1464230340, 1464230400, 1464230460, 1464230520, 1464230580, 1464230640, 1464230700, 1464230760, 1464230820, 1464230880, 1464230940, 1464231000, 1464231060, 1464231120, 1464231180, 1464231240, 1464231300, 1464231360, 1464231420, 1464231480, 1464231540, 1464231600, 1464231660, 1464231720, 1464231780, 1464231840, 1464231900, 1464231960, 1464232020, 1464232080, 1464232140, 1464232200, 1464232260, 1464232320, 1464232380, 1464232440, 1464232500, 1464232560, 1464232620, 1464232680, 1464232740, 1464232800, 1464232860, 1464232920, 1464232980, 1464233040, 1464233100, 1464233160, 1464233220, 1464233280, 1464233340, 1464233400, 1464233460, 1464233520, 1464233580, 1464233640, 1464233700, 1464233760, 1464233820, 1464233880, 1464233940, 1464234000, 1464234060, 1464234120, 1464234180, 1464234240, 1464234300, 1464234360, 1464234420, 1464234480, 1464234540, 1464234600, 1464234660, 1464234720, 1464234780, 1464234840, 1464234900, 1464234960, 1464235020, 1464235080, 1464235140, 1464242400, 1464242460, 1464242520, 1464242580, 1464242640, 1464242700, 1464242760, 1464242820, 1464242880, 1464242940, 1464243000, 1464243060, 1464243180, 1464243300, 1464243360, 1464243420, 1464243480, 1464243540, 1464243600, 1464243660, 1464243720, 1464243840, 1464243900, 1464243960, 1464244020, 1464244080, 1464244140, 1464244200, 1464244320, 1464244380, 1464244440, 1464244500, 1464244560, 1464244620, 1464244680, 1464244740, 1464244980, 1464245040, 1464245100, 1464245160, 1464245220, 1464245280, 1464245340, 1464245400, 1464245460, 1464245520, 1464245580, 1464245640, 1464245760, 1464245820, 1464245880, 1464245940, 1464246000, 1464246180, 1464246240, 1464246300, 1464246420, 1464246480, 1464246540, 1464246600, 1464246660, 1464246720, 1464246780, 1464246840, 1464246900, 1464246960, 1464247140, 1464247200, 1464247260, 1464247320, 1464247380, 1464247440, 1464247560, 1464247620, 1464247680, 1464247740, 1464247800, 1464247860, 1464247920, 1464247980, 1464248040, 1464248100, 1464248160, 1464248220, 1464248280, 1464248340, 1464248400, 1464248460, 1464248520, 1464248640, 1464248700, 1464248820, 1464248880, 1464248940, 1464249000, 1464249060, 1464249180, 1464249240, 1464249300, 1464249360, 1464249480, 1464249540, 1464249600, 1464249660, 1464249720, 1464249780, 1464249840, 1464249900, 1464249960, 1464250020, 1464250080, 1464250200, 1464250260, 1464250320, 1464250380, 1464250440, 1464250500, 1464250560, 1464250620, 1464250680, 1464250740, 1464250800, 1464250860, 1464250920, 1464250980, 1464251040, 1464251100, 1464251160, 1464251220, 1464251400, 1464251460, 1464251640, 1464251700, 1464251760, 1464251820, 1464251880, 1464251940, 1464252000, 1464252060, 1464252240, 1464252300, 1464252360, 1464252420, 1464252480, 1464252540, 1464252600, 1464252660, 1464252720, 1464252780, 1464252840, 1464252900, 1464252960, 1464253020, 1464253080, 1464253140, 1464253200, 1464253260, 1464253320, 1464253380, 1464253440, 1464253500, 1464253560, 1464253620, 1464253680, 1464253740, 1464253800, 1464253860, 1464253920, 1464253980, 1464254040, 1464254100, 1464254160, 1464254220, 1464254280, 1464254340, 1464254400, 1464254460, 1464254520, 1464254580, 1464254640, 1464254700, 1464254760, 1464254820, 1464254880, 1464254940, 1464255000, 1464255060, 1464255120, 1464255180, 1464255240, 1464255300, 1464255360, 1464255420, 1464255480, 1464255540, 1464255600, 1464255660, 1464255720, 1464255780, 1464255840, 1464255900, 1464255960, 1464256020, 1464256080, 1464256140, 1464256200, 1464256260, 1464256320, 1464256380, 1464256440, 1464256500, 1464256560, 1464256620, 1464256680, 1464256740, 1464256800, 1464256860, 1464256920, 1464256980, 1464257040, 1464257100, 1464257160, 1464257220, 1464257280, 1464257340, 1464257400, 1464257460, 1464257520, 1464257580, 1464257640, 1464257700, 1464257760, 1464257820, 1464257880, 1464257940, 1464258000, 1464258060, 1464258120, 1464258180, 1464258240, 1464258300, 1464258360, 1464258420, 1464258480, 1464258540, 1464258600, 1464258660, 1464258720, 1464258780, 1464258840, 1464259020, 1464259080, 1464259200, 1464259260, 1464259320, 1464259380, 1464259440, 1464259500, 1464259560, 1464259620, 1464259680, 1464259740, 1464259800, 1464259860, 1464259920, 1464259980, 1464260040, 1464260160, 1464260220, 1464260280, 1464260340, 1464260400, 1464260460, 1464260520, 1464260580, 1464260640, 1464260700, 1464260760, 1464260820, 1464260880, 1464260940, 1464261000, 1464261060, 1464261180, 1464261240, 1464261300, 1464261360, 1464261420, 1464261480, 1464261540, 1464261600, 1464261660, 1464261720, 1464261780, 1464261840, 1464261900, 1464261960, 1464262020, 1464262080, 1464262140, 1464262200, 1464262260, 1464262320, 1464262380, 1464262440, 1464262500, 1464262560, 1464262620, 1464262680, 1464262740, 1464262800, 1464262860, 1464262920, 1464262980, 1464263040, 1464263100, 1464263220, 1464263280, 1464263340, 1464263400, 1464263460, 1464263520, 1464263580, 1464263640, 1464263700, 1464263820, 1464263880, 1464264000, 1464264060, 1464264120, 1464264240, 1464264300, 1464264360, 1464264420, 1464264480, 1464264540, 1464264600, 1464264660, 1464264720, 1464264780, 1464264840, 1464264900, 1464264960, 1464265020, 1464265080, 1464265140, 1464265200, 1464265260, 1464265320, 1464265380, 1464265440, 1464265500, 1464265560, 1464265620, 1464265740, 1464265800, 1464265860, 1464265920, 1464265980, 1464266040, 1464266100, 1464266160, 1464266220, 1464266280, 1464266340, 1464266400, 1464266460, 1464266520, 1464266580, 1464266640, 1464266700, 1464266760, 1464266820, 1464266880, 1464266940, 1464267000, 1464267060, 1464267120, 1464267180, 1464267240, 1464267300, 1464267360, 1464267420, 1464267480, 1464267540, 1464267600, 1464267660, 1464267720, 1464267780, 1464267840, 1464267900, 1464267960, 1464268020, 1464268080, 1464268140, 1464268200, 1464268260, 1464268440, 1464268500, 1464268560, 1464268620, 1464268800, 1464268860, 1464268920, 1464268980, 1464269040, 1464269100, 1464269160, 1464269220, 1464269280, 1464269340, 1464269460, 1464269520, 1464269580, 1464269640, 1464269700, 1464269760, 1464269820, 1464269880, 1464269940, 1464270000, 1464270060, 1464270120, 1464270240, 1464270300, 1464270360, 1464270420, 1464270480, 1464270540, 1464270600, 1464270660, 1464270720, 1464270780, 1464270840, 1464270900, 1464271020, 1464271140, 1464271200, 1464271260, 1464271320, 1464271380, 1464271440, 1464271500, 1464271560, 1464271620, 1464271680, 1464271740, 1464271800, 1464271860, 1464271920, 1464271980, 1464272040, 1464272100, 1464272160, 1464272220, 1464272280, 1464272340, 1464272400, 1464272460, 1464272520, 1464272580, 1464272640, 1464272700, 1464272760, 1464272880, 1464272940, 1464273000, 1464273060, 1464273120, 1464273180, 1464273240, 1464273300, 1464273360, 1464273420, 1464273480, 1464273540, 1464273600, 1464273660, 1464273720, 1464273780, 1464273840, 1464273900, 1464273960, 1464274020, 1464274080, 1464274140, 1464274200, 1464274260, 1464274320, 1464274380, 1464274440, 1464274500, 1464274560, 1464274620, 1464274680, 1464274740, 1464274800, 1464274860, 1464274920, 1464274980, 1464275040, 1464275100, 1464275160, 1464275220, 1464275280, 1464275340, 1464275400, 1464275460, 1464275520, 1464275580, 1464275640, 1464275700, 1464275760, 1464275820, 1464275880, 1464275940, 1464276000, 1464276060, 1464276120, 1464276180, 1464276240, 1464276300, 1464276360, 1464276420, 1464276480, 1464276540, 1464276600, 1464276660, 1464276720, 1464276780, 1464276840, 1464276900, 1464276960, 1464277020, 1464277080, 1464277140, 1464277200, 1464277260, 1464277320, 1464277380, 1464277440, 1464277500, 1464277560, 1464277620, 1464277680, 1464277740, 1464277800, 1464277860, 1464277920, 1464277980, 1464278040, 1464278100, 1464278160, 1464278220, 1464278280, 1464278340, 1464278400, 1464278460, 1464278520, 1464278580, 1464278640, 1464278700, 1464278760, 1464278820, 1464278880, 1464278940, 1464279000, 1464279060, 1464279120, 1464279180, 1464279240, 1464279300, 1464279360, 1464279420, 1464279480, 1464279540, 1464279600, 1464279660, 1464279720, 1464279780, 1464279840, 1464279900, 1464279960, 1464280020, 1464280080, 1464280140, 1464280200, 1464280260, 1464280320, 1464280380, 1464280440, 1464280500, 1464280560, 1464280620, 1464280680, 1464280740, 1464280800, 1464280860, 1464280920, 1464280980, 1464281040, 1464281100, 1464281160, 1464281220, 1464281280, 1464281340, 1464281400, 1464281460, 1464281520, 1464281580, 1464281640, 1464281700, 1464281760, 1464281820, 1464281880, 1464281940, 1464282000, 1464282060, 1464282120, 1464282180, 1464282240, 1464282300, 1464282360, 1464282420, 1464282480, 1464282540, 1464282600, 1464282660, 1464282720, 1464282780, 1464282840, 1464282900, 1464282960, 1464283020, 1464283080, 1464283140, 1464283200, 1464283260, 1464283320, 1464283380, 1464283440, 1464283500, 1464283560, 1464283620, 1464283680, 1464283740, 1464283800, 1464283860, 1464283920, 1464283980, 1464284040, 1464284100, 1464284160, 1464284220, 1464284280, 1464284340, 1464284400, 1464284460, 1464284520, 1464284580, 1464284640, 1464284700, 1464284760, 1464284820, 1464284880, 1464284940, 1464285000, 1464285060, 1464285120, 1464285180, 1464285240, 1464285300, 1464285360, 1464285420, 1464285480, 1464285540, 1464285600, 1464285660, 1464285720, 1464285780, 1464285840, 1464285900, 1464285960, 1464286020, 1464286080, 1464286140, 1464286200, 1464286260, 1464286320, 1464286380, 1464286440, 1464286500, 1464286560, 1464286620, 1464286680, 1464286740, 1464286800, 1464286860, 1464286920, 1464286980, 1464287040, 1464287100, 1464287160, 1464287220, 1464287280, 1464287340, 1464287400, 1464287460, 1464287520, 1464287580, 1464287640, 1464287700, 1464287760, 1464287820, 1464287880, 1464287940, 1464288000, 1464288060, 1464288120, 1464288180, 1464288240, 1464288300, 1464288360, 1464288420, 1464288480, 1464288540, 1464288600, 1464288660, 1464288720, 1464288780, 1464288840, 1464288900, 1464288960, 1464289020, 1464289080, 1464289140, 1464289200, 1464289260, 1464289320, 1464289380, 1464289440, 1464289500, 1464289560, 1464289620, 1464289680, 1464289740, 1464289800, 1464289860, 1464289920, 1464289980, 1464290040, 1464290100, 1464290160, 1464290220, 1464290280, 1464290340, 1464290400, 1464290460, 1464290520, 1464290580, 1464290640, 1464290700, 1464290760, 1464290820, 1464290880, 1464290940, 1464291000, 1464291060, 1464291120, 1464291180, 1464291240, 1464291300, 1464291360, 1464291420, 1464291480, 1464291540, 1464291600, 1464291660, 1464291720, 1464291780, 1464291840, 1464291900, 1464291960, 1464292020, 1464292080, 1464292140, 1464292200, 1464292260, 1464292320, 1464292380, 1464292440, 1464292500, 1464292560, 1464292620, 1464292680, 1464292740, 1464292800, 1464292860, 1464292920, 1464292980, 1464293040, 1464293100, 1464293220, 1464293280, 1464293340, 1464293400, 1464293460, 1464293520, 1464293580, 1464293640, 1464293700, 1464293760, 1464293820, 1464293880, 1464293940, 1464294000, 1464294060, 1464294120, 1464294180, 1464294240, 1464294300, 1464294360, 1464294420, 1464294480, 1464294540, 1464294600, 1464294660, 1464294720, 1464294780, 1464294840, 1464294900, 1464294960, 1464295020, 1464295080, 1464295140, 1464295200, 1464295260, 1464295320, 1464295380, 1464295440, 1464295500, 1464295560, 1464295620, 1464295680, 1464295740, 1464295800, 1464295860, 1464295920, 1464295980, 1464296040, 1464296100, 1464296160, 1464296220, 1464296280, 1464296340, 1464296400, 1464296460, 1464296520, 1464296580, 1464296640, 1464296700, 1464296760, 1464296820, 1464296880, 1464296940, 1464297000, 1464297060, 1464297120, 1464297180, 1464297240, 1464297300, 1464297360], "c": [2453, 2451, 2449, 2447, 2449, 2449, 2447, 2452, 2453, 2453, 2452, 2450, 2451, 2450, 2451, 2452, 2451, 2450, 2450, 2449, 2451, 2453, 2454, 2452, 2451, 2452, 2451, 2451, 2450, 2450, 2452, 2454, 2455, 2453, 2453, 2453, 2452, 2453, 2452, 2452, 2453, 2455, 2456, 2457, 2457, 2456, 2455, 2454, 2456, 2456, 2457, 2457, 2457, 2459, 2458, 2457, 2457, 2457, 2457, 2460, 2462, 2464, 2467, 2466, 2466, 2466, 2465, 2463, 2464, 2463, 2464, 2463, 2465, 2465, 2464, 2464, 2464, 2463, 2465, 2465, 2464, 2466, 2466, 2466, 2469, 2471, 2472, 2472, 2472, 2473, 2475, 2475, 2474, 2472, 2469, 2471, 2471, 2470, 2470, 2470, 2470, 2470, 2471, 2470, 2472, 2470, 2472, 2471, 2471, 2471, 2470, 2471, 2474, 2471, 2473, 2470, 2470, 2470, 2470, 2471, 2470, 2469, 2468, 2470, 2469, 2469, 2470, 2470, 2469, 2470, 2471, 2471, 2472, 2472, 2473, 2475, 2474, 2475, 2475, 2476, 2474, 2474, 2475, 2477, 2480, 2479, 2481, 2481, 2485, 2483, 2481, 2482, 2482, 2484, 2484, 2484, 2484, 2487, 2487, 2487, 2487, 2489, 2489, 2490, 2490, 2492, 2492, 2490, 2491, 2490, 2491, 2491, 2491, 2491, 2490, 2490, 2490, 2489, 2488, 2488, 2487, 2487, 2488, 2488, 2488, 2487, 2488, 2488, 2488, 2488, 2488, 2486, 2487, 2487, 2489, 2489, 2488, 2488, 2488, 2488, 2488, 2489, 2487, 2488, 2488, 2487, 2488, 2488, 2489, 2489, 2488, 2488, 2488, 2488, 2488, 2488, 2487, 2488, 2488, 2487, 2488, 2488, 2489, 2488, 2489, 2490, 2490, 2490, 2490, 2490, 2491, 2490, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2490, 2490, 2491, 2490, 2488, 2487, 2487, 2487, 2488, 2486, 2487, 2486, 2486, 2487, 2485, 2484, 2485, 2485, 2485, 2486, 2485, 2486, 2485, 2485, 2485, 2484, 2484, 2484, 2484, 2483, 2484, 2484, 2484, 2484, 2485, 2485, 2485, 2484, 2485, 2485, 2485, 2485, 2486, 2487, 2487, 2486, 2486, 2487, 2487, 2487, 2487, 2486, 2486, 2486, 2486, 2487, 2487, 2486, 2485, 2486, 2486, 2487, 2487, 2487, 2487, 2487, 2486, 2486, 2486, 2486, 2487, 2487, 2487, 2486, 2487, 2487, 2487, 2487, 2487, 2486, 2486, 2486, 2486, 2486, 2486, 2485, 2484, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2483, 2484, 2484, 2484, 2484, 2483, 2483, 2482, 2482, 2483, 2483, 2482, 2482, 2483, 2483, 2483, 2484, 2484, 2484, 2484, 2485, 2485, 2485, 2485, 2485, 2486, 2487, 2486, 2486, 2486, 2485, 2486, 2486, 2486, 2485, 2486, 2486, 2486, 2486, 2485, 2485, 2485, 2484, 2484, 2484, 2483, 2483, 2483, 2483, 2484, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2484, 2484, 2484, 2484, 2485, 2485, 2483, 2483, 2483, 2484, 2487, 2489, 2488, 2488, 2489, 2488, 2489, 2491, 2492, 2492, 2491, 2493, 2491, 2492, 2492, 2492, 2493, 2492, 2491, 2491, 2490, 2491, 2490, 2490, 2490, 2490, 2491, 2490, 2489, 2487, 2487, 2488, 2489, 2489, 2488, 2489, 2489, 2489, 2489, 2489, 2489, 2490, 2488, 2488, 2489, 2488, 2488, 2489, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2489, 2491, 2490, 2490, 2490, 2490, 2489, 2490, 2490, 2490, 2491, 2491, 2491, 2491, 2491, 2491, 2491, 2489, 2490, 2491, 2492, 2492, 2492, 2491, 2492, 2491, 2492, 2491, 2491, 2491, 2491, 2491, 2490, 2491, 2492, 2492, 2492, 2493, 2493, 2492, 2491, 2492, 2492, 2492, 2491, 2491, 2491, 2491, 2492, 2492, 2491, 2492, 2492, 2492, 2492, 2492, 2492, 2491, 2491, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2493, 2494, 2495, 2494, 2495, 2495, 2495, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2494, 2494, 2493, 2494, 2495, 2495, 2495, 2496, 2496, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2496, 2496, 2495, 2495, 2495, 2495, 2495, 2496, 2495, 2496, 2495, 2495, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2494, 2493, 2493, 2493, 2493, 2493, 2494, 2494, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2495, 2494, 2494, 2494, 2495, 2494, 2495, 2494, 2495, 2494, 2495, 2494, 2494, 2495, 2494, 2494, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2494, 2493, 2494, 2494, 2493, 2494, 2493, 2494, 2493, 2493, 2493, 2492, 2493, 2493, 2493, 2493, 2494, 2494, 2493, 2493, 2494, 2493, 2493, 2493, 2493, 2494, 2494, 2494, 2494, 2493, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2495, 2494, 2495, 2495, 2494, 2494, 2494, 2496, 2495, 2495, 2494, 2497, 2496, 2495, 2497, 2497, 2497, 2498, 2496, 2496, 2495, 2495, 2495, 2495, 2495, 2494, 2494, 2494, 2494, 2494, 2490, 2491, 2492, 2492, 2492, 2492, 2491, 2491, 2492, 2492, 2492, 2491, 2492, 2492, 2493, 2493, 2493, 2492, 2491, 2490, 2490, 2491, 2491, 2492, 2492, 2493, 2491, 2492, 2492, 2491, 2493, 2494, 2493, 2493, 2495, 2494, 2493, 2495, 2495, 2495, 2495, 2494, 2493, 2494, 2494, 2494, 2494, 2494, 2495, 2495, 2495, 2495, 2495, 2493, 2494, 2495, 2496, 2494, 2496, 2494, 2494, 2494, 2495, 2495, 2494, 2495, 2494, 2493, 2492, 2492, 2492, 2494, 2493, 2492, 2490, 2489, 2489, 2487, 2486, 2488, 2487, 2488, 2489, 2489, 2487, 2487, 2486, 2487, 2486, 2485, 2485, 2485, 2485, 2487, 2487, 2486, 2485, 2486, 2486, 2487, 2487, 2487, 2490, 2490, 2489, 2489, 2488, 2490, 2492, 2491, 2492, 2493, 2492, 2493, 2492, 2492, 2491, 2491, 2491, 2491, 2492, 2492, 2492, 2490, 2490, 2491, 2491, 2491, 2492, 2492, 2491, 2490, 2491, 2491, 2490, 2490, 2489, 2489, 2490, 2490, 2491, 2490, 2492, 2492, 2492, 2494, 2492, 2492, 2492, 2493, 2494, 2493, 2494, 2493, 2493, 2493, 2494, 2494, 2494, 2494, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2492, 2491, 2492, 2492, 2492, 2491, 2491, 2491, 2492, 2493, 2493, 2493, 2492, 2492, 2492, 2493, 2493, 2493, 2493, 2494, 2494, 2494, 2494, 2495, 2495, 2495, 2495, 2496, 2496, 2496, 2495, 2494, 2494, 2494, 2494, 2494, 2494, 2495, 2493, 2494, 2494, 2493, 2494, 2494, 2494, 2495, 2495, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2495, 2494, 2494, 2494, 2494, 2494, 2494, 2492, 2492, 2493, 2492, 2493, 2493, 2493, 2492, 2492, 2492, 2491, 2492, 2492, 2492, 2492, 2492, 2493, 2494, 2495, 2494, 2495, 2494, 2494, 2495, 2494, 2494, 2494, 2495, 2495, 2495, 2495, 2495, 2496, 2495, 2496, 2496, 2495, 2495, 2496, 2496, 2495, 2495, 2495, 2500, 2502, 2503, 2503, 2503, 2503, 2503, 2503, 2502, 2503, 2502, 2503, 2502, 2502, 2502, 2503, 2505, 2506, 2508, 2508, 2510, 2510, 2506, 2504, 2505, 2505, 2505, 2504, 2503, 2503, 2504, 2504, 2505, 2502, 2502, 2501, 2502, 2502, 2502, 2503, 2505, 2505, 2504, 2504, 2504, 2506, 2505, 2500, 2503, 2500, 2499, 2504, 2503, 2503, 2504, 2504, 2504, 2505, 2506, 2507, 2505, 2506, 2506, 2505, 2504, 2505, 2504, 2504, 2503, 2504, 2500, 2499, 2497, 2497, 2498, 2499, 2499, 2493, 2496, 2494, 2496, 2497, 2497, 2498, 2495, 2495, 2495, 2496, 2500, 2500, 2501, 2503], "o": [2452, 2453, 2451, 2449, 2447, 2449, 2448, 2447, 2451, 2452, 2452, 2451, 2450, 2450, 2450, 2450, 2451, 2451, 2451, 2450, 2449, 2450, 2453, 2454, 2452, 2451, 2453, 2451, 2451, 2450, 2450, 2452, 2454, 2455, 2453, 2453, 2453, 2451, 2453, 2453, 2452, 2454, 2455, 2457, 2457, 2457, 2456, 2456, 2454, 2456, 2456, 2457, 2457, 2457, 2459, 2458, 2457, 2457, 2457, 2457, 2460, 2462, 2463, 2468, 2466, 2465, 2465, 2464, 2462, 2463, 2464, 2464, 2464, 2465, 2465, 2465, 2464, 2464, 2464, 2466, 2465, 2464, 2466, 2467, 2466, 2468, 2471, 2472, 2471, 2472, 2473, 2475, 2475, 2474, 2473, 2469, 2472, 2471, 2469, 2470, 2469, 2469, 2470, 2470, 2471, 2472, 2471, 2472, 2471, 2471, 2472, 2470, 2471, 2473, 2472, 2473, 2470, 2471, 2470, 2470, 2472, 2470, 2469, 2468, 2470, 2469, 2469, 2470, 2470, 2470, 2470, 2471, 2471, 2472, 2472, 2473, 2475, 2474, 2475, 2475, 2476, 2474, 2474, 2475, 2476, 2480, 2479, 2481, 2481, 2484, 2483, 2481, 2482, 2481, 2484, 2484, 2484, 2484, 2487, 2487, 2487, 2486, 2488, 2490, 2490, 2490, 2491, 2492, 2491, 2491, 2490, 2491, 2490, 2490, 2491, 2491, 2490, 2490, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2487, 2487, 2489, 2488, 2489, 2489, 2488, 2487, 2487, 2488, 2489, 2489, 2488, 2488, 2488, 2488, 2488, 2489, 2488, 2488, 2487, 2488, 2487, 2488, 2489, 2489, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2489, 2488, 2488, 2489, 2489, 2490, 2490, 2490, 2490, 2490, 2490, 2489, 2490, 2489, 2490, 2489, 2489, 2489, 2483, 2490, 2491, 2489, 2488, 2487, 2486, 2488, 2487, 2485, 2487, 2487, 2487, 2486, 2486, 2484, 2485, 2485, 2485, 2486, 2486, 2485, 2485, 2485, 2485, 2484, 2483, 2483, 2483, 2484, 2484, 2484, 2484, 2484, 2485, 2485, 2484, 2485, 2485, 2485, 2485, 2485, 2486, 2487, 2487, 2486, 2487, 2487, 2487, 2487, 2486, 2486, 2486, 2487, 2487, 2487, 2487, 2486, 2486, 2486, 2486, 2487, 2487, 2487, 2487, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2487, 2487, 2487, 2487, 2487, 2486, 2487, 2486, 2487, 2486, 2486, 2486, 2484, 2485, 2485, 2485, 2485, 2485, 2485, 2484, 2485, 2485, 2484, 2484, 2483, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2483, 2484, 2484, 2484, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2482, 2483, 2483, 2485, 2484, 2484, 2484, 2486, 2485, 2485, 2485, 2486, 2486, 2487, 2486, 2486, 2486, 2486, 2486, 2486, 2485, 2486, 2486, 2486, 2485, 2485, 2485, 2485, 2485, 2484, 2484, 2483, 2483, 2483, 2483, 2483, 2483, 2484, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2484, 2484, 2485, 2485, 2484, 2484, 2483, 2483, 2484, 2485, 2487, 2488, 2488, 2488, 2488, 2488, 2489, 2491, 2491, 2492, 2492, 2493, 2491, 2492, 2492, 2492, 2492, 2492, 2490, 2491, 2491, 2491, 2490, 2490, 2490, 2490, 2491, 2489, 2489, 2487, 2488, 2488, 2489, 2488, 2488, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2488, 2489, 2488, 2489, 2489, 2488, 2489, 2488, 2488, 2489, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2489, 2491, 2491, 2491, 2490, 2490, 2490, 2490, 2490, 2490, 2492, 2492, 2491, 2490, 2491, 2491, 2489, 2490, 2490, 2491, 2492, 2492, 2492, 2492, 2491, 2491, 2491, 2491, 2492, 2491, 2490, 2491, 2491, 2491, 2492, 2492, 2493, 2493, 2493, 2492, 2492, 2492, 2492, 2491, 2491, 2491, 2491, 2492, 2492, 2491, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2491, 2491, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2494, 2494, 2495, 2494, 2495, 2494, 2495, 2493, 2495, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2494, 2493, 2494, 2494, 2494, 2495, 2495, 2496, 2496, 2496, 2496, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2496, 2495, 2495, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2494, 2494, 2493, 2493, 2494, 2494, 2494, 2494, 2495, 2494, 2494, 2494, 2493, 2493, 2493, 2494, 2493, 2493, 2493, 2493, 2493, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2495, 2494, 2495, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2495, 2495, 2495, 2495, 2494, 2494, 2494, 2494, 2494, 2493, 2494, 2493, 2493, 2493, 2495, 2493, 2494, 2493, 2493, 2492, 2493, 2493, 2493, 2493, 2493, 2494, 2494, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2494, 2493, 2494, 2494, 2493, 2493, 2494, 2494, 2494, 2494, 2493, 2494, 2494, 2494, 2495, 2494, 2494, 2495, 2494, 2494, 2495, 2496, 2495, 2495, 2494, 2496, 2496, 2496, 2497, 2498, 2496, 2498, 2496, 2496, 2496, 2495, 2494, 2494, 2495, 2494, 2494, 2494, 2494, 2494, 2490, 2491, 2492, 2491, 2492, 2492, 2491, 2491, 2491, 2492, 2493, 2492, 2492, 2492, 2492, 2494, 2492, 2492, 2492, 2490, 2491, 2491, 2492, 2492, 2491, 2493, 2491, 2492, 2492, 2491, 2492, 2493, 2492, 2493, 2495, 2494, 2493, 2495, 2495, 2496, 2494, 2494, 2494, 2494, 2495, 2494, 2495, 2494, 2495, 2495, 2495, 2496, 2495, 2493, 2494, 2495, 2496, 2495, 2495, 2494, 2493, 2495, 2494, 2495, 2495, 2494, 2494, 2493, 2491, 2492, 2492, 2493, 2492, 2492, 2491, 2489, 2488, 2487, 2486, 2488, 2487, 2488, 2488, 2488, 2487, 2487, 2487, 2487, 2486, 2485, 2484, 2485, 2485, 2486, 2487, 2486, 2485, 2486, 2486, 2486, 2488, 2487, 2490, 2490, 2490, 2489, 2488, 2490, 2492, 2492, 2492, 2493, 2493, 2492, 2493, 2492, 2491, 2492, 2491, 2491, 2491, 2492, 2491, 2491, 2490, 2491, 2491, 2491, 2492, 2492, 2491, 2490, 2490, 2491, 2490, 2490, 2489, 2489, 2490, 2490, 2491, 2491, 2491, 2492, 2492, 2493, 2492, 2492, 2492, 2493, 2494, 2494, 2493, 2494, 2493, 2493, 2494, 2494, 2495, 2494, 2493, 2494, 2494, 2494, 2493, 2493, 2493, 2492, 2491, 2492, 2492, 2492, 2491, 2491, 2491, 2492, 2493, 2494, 2493, 2492, 2492, 2492, 2493, 2493, 2493, 2493, 2494, 2494, 2494, 2494, 2495, 2495, 2495, 2495, 2496, 2496, 2496, 2495, 2494, 2495, 2494, 2494, 2493, 2494, 2495, 2494, 2494, 2494, 2493, 2494, 2494, 2494, 2495, 2494, 2494, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2495, 2493, 2492, 2493, 2493, 2492, 2492, 2493, 2493, 2492, 2492, 2492, 2492, 2491, 2492, 2492, 2492, 2493, 2494, 2494, 2495, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2496, 2495, 2495, 2496, 2496, 2495, 2495, 2496, 2495, 2495, 2495, 2496, 2495, 2495, 2495, 2496, 2501, 2501, 2503, 2504, 2503, 2503, 2503, 2502, 2502, 2503, 2503, 2502, 2502, 2502, 2503, 2506, 2505, 2505, 2508, 2508, 2509, 2506, 2506, 2505, 2504, 2505, 2505, 2504, 2503, 2503, 2504, 2503, 2504, 2502, 2501, 2500, 2501, 2501, 2501, 2503, 2504, 2504, 2505, 2505, 2504, 2505, 2505, 2501, 2502, 2501, 2500, 2504, 2504, 2504, 2503, 2504, 2504, 2505, 2506, 2507, 2505, 2505, 2505, 2505, 2504, 2505, 2504, 2504, 2504, 2504, 2501, 2499, 2496, 2497, 2498, 2500, 2499, 2493, 2496, 2493, 2497, 2497, 2496, 2497, 2495, 2495, 2495, 2496, 2499, 2500, 2501], "h": [2453, 2454, 2452, 2449, 2449, 2449, 2449, 2453, 2453, 2453, 2452, 2451, 2452, 2451, 2451, 2452, 2451, 2452, 2451, 2450, 2452, 2454, 2455, 2454, 2453, 2452, 2453, 2451, 2451, 2451, 2452, 2454, 2456, 2455, 2453, 2454, 2453, 2453, 2453, 2453, 2454, 2455, 2457, 2457, 2458, 2458, 2456, 2456, 2456, 2456, 2457, 2458, 2457, 2459, 2459, 2458, 2457, 2458, 2457, 2460, 2463, 2464, 2467, 2468, 2466, 2466, 2466, 2465, 2464, 2465, 2465, 2464, 2465, 2465, 2465, 2465, 2464, 2465, 2466, 2466, 2465, 2466, 2466, 2467, 2469, 2472, 2472, 2472, 2473, 2473, 2476, 2476, 2475, 2474, 2473, 2471, 2472, 2471, 2470, 2471, 2470, 2470, 2471, 2471, 2472, 2472, 2472, 2473, 2472, 2471, 2472, 2471, 2474, 2473, 2473, 2474, 2470, 2471, 2471, 2471, 2472, 2471, 2469, 2470, 2470, 2469, 2470, 2471, 2471, 2471, 2472, 2472, 2473, 2473, 2473, 2475, 2476, 2475, 2476, 2477, 2476, 2475, 2476, 2477, 2481, 2481, 2482, 2482, 2485, 2485, 2483, 2483, 2482, 2484, 2484, 2485, 2484, 2489, 2488, 2487, 2487, 2490, 2490, 2490, 2491, 2492, 2493, 2493, 2491, 2491, 2491, 2491, 2491, 2491, 2491, 2491, 2490, 2490, 2489, 2489, 2488, 2488, 2488, 2489, 2488, 2488, 2489, 2489, 2489, 2489, 2489, 2488, 2487, 2488, 2489, 2489, 2490, 2489, 2488, 2488, 2488, 2489, 2489, 2488, 2488, 2488, 2488, 2488, 2489, 2489, 2489, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2489, 2488, 2489, 2490, 2491, 2490, 2490, 2491, 2491, 2490, 2490, 2489, 2490, 2490, 2490, 2489, 2489, 2490, 2491, 2491, 2491, 2489, 2488, 2487, 2487, 2488, 2487, 2487, 2487, 2487, 2487, 2486, 2486, 2485, 2485, 2485, 2486, 2486, 2486, 2485, 2485, 2485, 2485, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2485, 2485, 2485, 2484, 2485, 2485, 2485, 2485, 2486, 2487, 2487, 2487, 2486, 2487, 2487, 2487, 2487, 2486, 2486, 2486, 2487, 2487, 2487, 2487, 2486, 2486, 2486, 2487, 2487, 2487, 2487, 2487, 2486, 2486, 2486, 2486, 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2486, 2487, 2486, 2487, 2486, 2486, 2486, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2485, 2484, 2485, 2485, 2484, 2484, 2484, 2484, 2484, 2483, 2483, 2483, 2483, 2483, 2484, 2483, 2483, 2483, 2483, 2483, 2484, 2485, 2484, 2484, 2485, 2486, 2485, 2485, 2486, 2486, 2487, 2487, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2485, 2485, 2485, 2485, 2484, 2484, 2483, 2483, 2483, 2484, 2484, 2484, 2484, 2483, 2483, 2483, 2483, 2483, 2483, 2484, 2484, 2485, 2485, 2485, 2485, 2484, 2483, 2483, 2485, 2487, 2489, 2491, 2488, 2489, 2489, 2490, 2491, 2492, 2492, 2493, 2493, 2493, 2492, 2492, 2492, 2493, 2493, 2492, 2491, 2491, 2491, 2491, 2490, 2490, 2490, 2492, 2491, 2490, 2489, 2487, 2488, 2489, 2489, 2488, 2489, 2489, 2489, 2489, 2489, 2489, 2490, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2488, 2489, 2488, 2488, 2488, 2488, 2488, 2488, 2489, 2491, 2491, 2491, 2491, 2490, 2490, 2490, 2490, 2490, 2491, 2492, 2492, 2491, 2491, 2491, 2491, 2490, 2490, 2491, 2492, 2492, 2492, 2492, 2492, 2491, 2492, 2492, 2491, 2492, 2491, 2491, 2491, 2491, 2492, 2492, 2492, 2493, 2494, 2493, 2492, 2492, 2492, 2492, 2492, 2491, 2491, 2491, 2492, 2492, 2491, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2493, 2494, 2495, 2496, 2495, 2495, 2495, 2495, 2494, 2495, 2494, 2495, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2494, 2494, 2494, 2494, 2495, 2495, 2495, 2496, 2496, 2496, 2496, 2496, 2495, 2495, 2495, 2495, 2496, 2496, 2496, 2496, 2495, 2495, 2495, 2496, 2495, 2496, 2495, 2495, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2494, 2493, 2493, 2493, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2495, 2495, 2495, 2494, 2494, 2494, 2493, 2493, 2493, 2494, 2493, 2493, 2493, 2493, 2493, 2495, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2495, 2495, 2494, 2494, 2495, 2494, 2495, 2495, 2495, 2495, 2495, 2495, 2494, 2495, 2495, 2494, 2494, 2494, 2495, 2495, 2495, 2495, 2494, 2494, 2494, 2494, 2494, 2493, 2494, 2494, 2494, 2495, 2495, 2494, 2494, 2493, 2493, 2493, 2494, 2493, 2493, 2493, 2494, 2494, 2494, 2493, 2494, 2494, 2493, 2493, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2495, 2495, 2495, 2495, 2495, 2495, 2494, 2496, 2496, 2496, 2495, 2497, 2497, 2496, 2497, 2497, 2498, 2498, 2498, 2496, 2496, 2496, 2495, 2495, 2495, 2495, 2495, 2495, 2494, 2494, 2494, 2491, 2493, 2492, 2492, 2492, 2492, 2491, 2492, 2492, 2492, 2493, 2492, 2493, 2493, 2494, 2494, 2492, 2492, 2492, 2491, 2491, 2492, 2493, 2492, 2493, 2494, 2492, 2492, 2492, 2493, 2494, 2495, 2493, 2495, 2495, 2494, 2495, 2495, 2496, 2496, 2495, 2494, 2494, 2495, 2495, 2495, 2495, 2495, 2496, 2495, 2496, 2496, 2495, 2495, 2495, 2496, 2496, 2496, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2494, 2494, 2492, 2492, 2494, 2494, 2493, 2492, 2491, 2490, 2488, 2488, 2489, 2488, 2488, 2489, 2489, 2488, 2488, 2487, 2487, 2487, 2487, 2485, 2485, 2486, 2487, 2487, 2487, 2487, 2486, 2486, 2487, 2487, 2488, 2491, 2491, 2491, 2490, 2489, 2490, 2492, 2492, 2492, 2493, 2493, 2493, 2493, 2493, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2491, 2491, 2491, 2491, 2491, 2492, 2493, 2492, 2491, 2491, 2491, 2491, 2491, 2490, 2489, 2490, 2490, 2491, 2491, 2492, 2492, 2492, 2494, 2493, 2492, 2492, 2493, 2494, 2494, 2494, 2494, 2494, 2493, 2494, 2494, 2495, 2495, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2493, 2492, 2492, 2493, 2492, 2492, 2491, 2491, 2492, 2493, 2493, 2494, 2493, 2492, 2493, 2493, 2494, 2493, 2493, 2494, 2495, 2494, 2494, 2495, 2495, 2495, 2495, 2496, 2496, 2496, 2496, 2495, 2495, 2495, 2494, 2494, 2494, 2495, 2495, 2494, 2494, 2494, 2494, 2494, 2495, 2495, 2495, 2494, 2494, 2494, 2494, 2495, 2495, 2494, 2494, 2495, 2495, 2494, 2494, 2494, 2495, 2495, 2494, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2492, 2492, 2492, 2492, 2492, 2493, 2492, 2492, 2494, 2494, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2494, 2496, 2496, 2495, 2496, 2496, 2496, 2496, 2496, 2496, 2496, 2495, 2496, 2496, 2496, 2495, 2496, 2500, 2503, 2503, 2504, 2504, 2504, 2503, 2503, 2503, 2503, 2503, 2503, 2503, 2502, 2502, 2503, 2506, 2507, 2508, 2509, 2510, 2510, 2506, 2506, 2505, 2505, 2505, 2505, 2504, 2503, 2504, 2504, 2505, 2504, 2502, 2502, 2502, 2502, 2502, 2503, 2505, 2505, 2505, 2505, 2505, 2506, 2506, 2505, 2503, 2503, 2501, 2504, 2504, 2505, 2504, 2504, 2505, 2505, 2506, 2508, 2507, 2506, 2506, 2506, 2505, 2506, 2506, 2505, 2504, 2504, 2504, 2501, 2499, 2497, 2498, 2500, 2500, 2499, 2496, 2496, 2497, 2498, 2499, 2498, 2498, 2497, 2496, 2496, 2501, 2501, 2501, 2504], "l": [2451, 2450, 2449, 2445, 2447, 2448, 2446, 2446, 2450, 2452, 2451, 2450, 2450, 2449, 2449, 2450, 2449, 2450, 2449, 2449, 2449, 2450, 2453, 2452, 2450, 2451, 2451, 2450, 2450, 2449, 2450, 2452, 2454, 2452, 2452, 2452, 2450, 2451, 2452, 2451, 2452, 2453, 2454, 2455, 2457, 2456, 2455, 2454, 2454, 2455, 2456, 2457, 2457, 2456, 2458, 2457, 2456, 2457, 2457, 2457, 2460, 2462, 2463, 2466, 2465, 2465, 2464, 2462, 2462, 2463, 2464, 2463, 2462, 2465, 2464, 2463, 2464, 2463, 2464, 2465, 2464, 2463, 2465, 2466, 2466, 2468, 2471, 2471, 2471, 2472, 2473, 2474, 2474, 2472, 2469, 2469, 2469, 2469, 2469, 2469, 2469, 2469, 2470, 2470, 2470, 2470, 2471, 2471, 2471, 2471, 2470, 2469, 2471, 2471, 2471, 2469, 2470, 2470, 2470, 2470, 2470, 2469, 2466, 2468, 2469, 2468, 2469, 2470, 2469, 2469, 2470, 2470, 2471, 2472, 2471, 2473, 2473, 2473, 2474, 2475, 2474, 2473, 2473, 2475, 2476, 2479, 2477, 2477, 2481, 2483, 2481, 2481, 2481, 2481, 2483, 2484, 2484, 2484, 2487, 2486, 2486, 2486, 2488, 2489, 2489, 2490, 2491, 2490, 2490, 2489, 2489, 2490, 2490, 2490, 2490, 2489, 2490, 2488, 2488, 2488, 2487, 2487, 2487, 2488, 2487, 2487, 2487, 2488, 2488, 2488, 2488, 2486, 2486, 2487, 2487, 2488, 2488, 2488, 2488, 2487, 2488, 2488, 2487, 2487, 2487, 2487, 2487, 2487, 2488, 2489, 2488, 2488, 2488, 2488, 2488, 2488, 2487, 2487, 2488, 2487, 2488, 2488, 2488, 2488, 2488, 2489, 2489, 2489, 2490, 2490, 2490, 2490, 2489, 2489, 2489, 2489, 2489, 2488, 2489, 2489, 2483, 2490, 2490, 2488, 2487, 2487, 2486, 2487, 2484, 2485, 2486, 2486, 2486, 2485, 2484, 2484, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2485, 2484, 2483, 2483, 2483, 2483, 2484, 2484, 2484, 2484, 2484, 2485, 2485, 2484, 2485, 2485, 2485, 2485, 2485, 2486, 2487, 2486, 2486, 2487, 2487, 2487, 2487, 2486, 2486, 2486, 2486, 2487, 2487, 2486, 2485, 2486, 2486, 2486, 2487, 2487, 2487, 2487, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2487, 2487, 2487, 2487, 2486, 2486, 2486, 2486, 2486, 2486, 2486, 2485, 2484, 2485, 2485, 2485, 2485, 2485, 2484, 2484, 2485, 2485, 2484, 2483, 2483, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2483, 2483, 2483, 2483, 2484, 2483, 2483, 2482, 2482, 2482, 2483, 2482, 2482, 2482, 2482, 2483, 2483, 2484, 2484, 2484, 2484, 2485, 2485, 2485, 2485, 2485, 2486, 2486, 2486, 2486, 2485, 2486, 2486, 2486, 2485, 2486, 2486, 2486, 2485, 2485, 2485, 2485, 2484, 2484, 2484, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2483, 2484, 2484, 2484, 2485, 2484, 2483, 2483, 2483, 2484, 2484, 2487, 2485, 2487, 2487, 2488, 2488, 2489, 2490, 2491, 2491, 2491, 2491, 2491, 2491, 2491, 2492, 2492, 2491, 2490, 2490, 2490, 2489, 2490, 2490, 2490, 2490, 2489, 2489, 2487, 2487, 2487, 2487, 2489, 2488, 2488, 2489, 2489, 2489, 2489, 2489, 2489, 2488, 2488, 2488, 2488, 2488, 2489, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2487, 2488, 2488, 2488, 2489, 2490, 2490, 2490, 2490, 2489, 2489, 2490, 2490, 2490, 2491, 2491, 2490, 2490, 2491, 2490, 2489, 2489, 2490, 2491, 2492, 2492, 2491, 2491, 2491, 2491, 2491, 2491, 2491, 2491, 2490, 2490, 2491, 2491, 2492, 2492, 2492, 2493, 2492, 2491, 2491, 2492, 2492, 2491, 2491, 2491, 2491, 2492, 2492, 2491, 2492, 2492, 2492, 2492, 2492, 2492, 2491, 2491, 2491, 2491, 2491, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2493, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2493, 2493, 2493, 2494, 2494, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2496, 2495, 2495, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2494, 2493, 2493, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2495, 2494, 2495, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2493, 2494, 2493, 2494, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2492, 2493, 2493, 2493, 2493, 2492, 2494, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2494, 2493, 2493, 2493, 2493, 2493, 2494, 2494, 2494, 2494, 2493, 2493, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2495, 2495, 2495, 2494, 2494, 2496, 2495, 2495, 2497, 2496, 2496, 2495, 2495, 2495, 2495, 2495, 2494, 2494, 2494, 2494, 2494, 2493, 2494, 2490, 2489, 2490, 2492, 2491, 2491, 2491, 2490, 2491, 2491, 2492, 2491, 2491, 2492, 2492, 2492, 2492, 2492, 2491, 2490, 2489, 2490, 2491, 2491, 2492, 2491, 2491, 2490, 2491, 2490, 2491, 2492, 2493, 2492, 2493, 2494, 2492, 2493, 2494, 2495, 2495, 2494, 2493, 2493, 2494, 2494, 2494, 2494, 2493, 2494, 2494, 2495, 2494, 2492, 2493, 2494, 2495, 2494, 2495, 2494, 2494, 2493, 2494, 2494, 2494, 2494, 2494, 2493, 2491, 2491, 2491, 2492, 2493, 2492, 2490, 2489, 2488, 2487, 2486, 2486, 2486, 2487, 2488, 2488, 2487, 2487, 2485, 2486, 2486, 2484, 2484, 2484, 2485, 2485, 2486, 2486, 2485, 2485, 2486, 2486, 2486, 2487, 2487, 2490, 2489, 2489, 2488, 2488, 2490, 2491, 2491, 2492, 2492, 2492, 2492, 2492, 2490, 2491, 2491, 2491, 2491, 2491, 2491, 2490, 2490, 2490, 2491, 2491, 2491, 2492, 2491, 2490, 2490, 2490, 2490, 2490, 2488, 2488, 2489, 2490, 2490, 2490, 2491, 2491, 2492, 2492, 2492, 2492, 2492, 2492, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2494, 2494, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2492, 2490, 2491, 2492, 2492, 2491, 2490, 2490, 2491, 2492, 2493, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2494, 2493, 2494, 2494, 2495, 2494, 2494, 2495, 2495, 2495, 2494, 2494, 2494, 2494, 2493, 2493, 2493, 2494, 2493, 2493, 2493, 2492, 2493, 2494, 2494, 2494, 2494, 2493, 2493, 2493, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2493, 2494, 2494, 2493, 2492, 2492, 2493, 2492, 2492, 2492, 2493, 2492, 2492, 2492, 2491, 2491, 2491, 2492, 2492, 2492, 2492, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2496, 2495, 2495, 2495, 2496, 2499, 2501, 2503, 2503, 2503, 2503, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2505, 2505, 2505, 2508, 2507, 2509, 2506, 2504, 2504, 2504, 2504, 2504, 2502, 2502, 2503, 2503, 2503, 2502, 2501, 2500, 2500, 2501, 2501, 2501, 2503, 2504, 2504, 2504, 2504, 2504, 2504, 2500, 2500, 2500, 2498, 2499, 2503, 2503, 2503, 2502, 2504, 2504, 2505, 2505, 2505, 2504, 2505, 2505, 2504, 2504, 2504, 2503, 2503, 2503, 2500, 2498, 2496, 2496, 2497, 2498, 2498, 2491, 2493, 2493, 2493, 2496, 2496, 2496, 2495, 2495, 2494, 2494, 2496, 2499, 2499, 2500], "v": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "s": "ok" };

            _yrice = 2490;
            codeType = 9999;

            //获取数据条数要按时间段的 数据点数取，需优化
            var trade_time = getTradeSession(codeType); //交易时间段
            var trade_arry = trade_time.split(",");
            //起始时间点用
            var start_str = trade_arry[0].substr(0, 4);
            var stop_str = trade_arry[trade_arry.length - 1].substr(5, 4);
            //间断点用
            var temp1 = 0;
            if (trade_arry.length >= 2) {
                temp1 = 1;
                var temp1_str = trade_arry[0].substr(5, 4);
                var temp1_stop = trade_arry[1].substr(0, 4);

            }


            var last_time = data.t[0]; //历史数据中 最后一个点的时间搓, 每画一个点得传入新点的时间撮( 需按情况处理 )

            var pre_last_time = data.t[1]; //历史数据中 当前倒数第二个点的时间撮, 数据点的区间按这个点的日期取。

            var pre_last_date = timeStamptostr(pre_last_time, "yyyy-MM-dd"); //取最后一个点的日期
            var pre_start_str = pre_last_date.toString() + " " + start_str.substr(0, 2) + ":" + start_str.substr(2, 2) + ":00"; //字符串，需转换成时间类型
            var pre_start_map = stringtoTime(pre_start_str).getTime();
            if (last_time == (pre_start_map / 1000)) {
                last_time = pre_last_time; //取前一个周期
            }

            var last_date = timeStamptostr(last_time, "yyyy-MM-dd"); //取最后一个点的日期
            var newstart_date = last_date.toString() + " " + start_str.substr(0, 2) + ":" + start_str.substr(2, 2) + ":00"; //开始时间字符串，需转换成时间类型

            var newstop_date = last_date.toString() + " " + stop_str.substr(0, 2) + ":" + stop_str.substr(2, 2) + ":00";


            var new_start = stringtoTime(newstart_date); //第一个数据点的时间

            var new_stop = stringtoTime(newstop_date);

            var start_stamp = new_start.getTime(); //第一个数据点的初始时间撮,

            var stop_stamp = new_stop.getTime(); //最后坐标的初始时间撮，经多重判断后会赋值给StopTim，作为最终坐标


            var StartTim, StopTim; //数据抽的起 始坐标


            var Price = []; //历史数据数组
            var pline = []; //昨收价数据数组
            for (i = 0; i < data.t.length; i++) {
                if (data.t[i] >= (start_stamp / 1000)) {
                    Price.push([
                        Date.parse(getLocalTime(data.t[i])), // the date result.t[0]
                        parseFloat(eval(data.c[i])) // close
                    ]);
                }

            } //当天接口历史数据存入数组
            if (Price.length > 1)//当天行情有数据
            {
                if (stop_stamp > start_stamp) {
                    StartTim = start_stamp; //开盘时间
                    StopTim = stop_stamp; //休市时间
                }
                else {
                    StartTim = start_stamp; //开盘时间
                    StopTim = stop_stamp + (24 * 60 * 60 * 1000); //休市时间后推一天
                }
            }
            else//前一天接口历史数据存入数组
            {
                if (stop_stamp > start_stamp) {
                    StartTim = start_stamp - (24 * 60 * 60 * 1000); //开盘时间
                    StopTim = stop_stamp - (24 * 60 * 60 * 1000); //前一个日期 休市时间
                }
                else {
                    StartTim = start_stamp - (24 * 60 * 60 * 1000); //前一个日期的开盘时间点
                    StopTim = stop_stamp; //休市时间后推一天
                }
                Price.length = 0; //清空数组
                for (i = 0; i < data.t.length; i++) {
                    if (data.t[i] >= StartTim / 1000) {
                        Price.push([
                        Date.parse(getLocalTime(data.t[i])), // the date result.t[0]
                        parseFloat(eval(data.c[i])) // close
                        ]);
                    }

                } //接口数据存入历史数据数组

            }
            Price.sort(); //按时间排序 一定要。

            var ptime = StartTim;
            var dex = ((StopTim - StartTim) / (5 * 60 * 1000)) + 1; //昨收价参考线的数据点数量
            var pdata = 0.0000;

            //获取昨收价
            pdata = parseFloat(_yrice);

            if (pdata < 0.0002) {
                pdata = Price[0][1];
            }

            //间断点时间戳
            if (temp1 == 1) {
                if (_exchCode != 'SHFE') {//除SHFE交易所外其余都为结束的日期加间断点时间

                    var temp1_str_time = timeStamptostr((StopTim / 1000), 'yyyy-MM-dd') + " " + temp1_str.substr(0, 2) + ":" + temp1_str.substr(2, 2) + ":00"; //字符串，需转换成时间类型
                    var temp1_str_map = stringtoTime(temp1_str_time).getTime();

                    var temp1_stop_time = timeStamptostr((StopTim / 1000), 'yyyy-MM-dd') + " " + temp1_stop.substr(0, 2) + ":" + temp1_stop.substr(2, 2) + ":00"; //字符串，需转换成时间类型
                    var temp1_stop_map = stringtoTime(temp1_stop_time).getTime();
                }
                else {
                    var temp1_str_time = timeStamptostr((StartTim / 1000), 'yyyy-MM-dd') + " " + temp1_str.substr(0, 2) + ":" + temp1_str.substr(2, 2) + ":00"; //字符串，需转换成时间类型
                    var temp1_str_map = stringtoTime(temp1_str_time).getTime();

                    var temp1_stop_time = timeStamptostr((StartTim / 1000), 'yyyy-MM-dd') + " " + temp1_stop.substr(0, 2) + ":" + temp1_stop.substr(2, 2) + ":00"; //字符串，需转换成时间类型
                    var temp1_stop_map = stringtoTime(temp1_stop_time).getTime();
                }

            }
            var prec = 0;
            for (i = 0; i < dex; i++) {
                ptime = StartTim + i * 5 * 60 * 1000
                if (temp1 == 1) {
                    if (ptime > temp1_str_map && ptime < temp1_stop_map) {
                        continue;
                    }
                }
                pline.push([
                        ptime, // the date result.t[0]
                        pdata // close
                ]);
                prec = pdata;
            } //昨收价存入数组

            // Create the chart
            $('#panel').highcharts('StockChart', {
                navigator: { enabled: false },
                scrollbar: { enabled: false },
                rangeSelector: { enabled: false },
                credits: {
                    text: ''
                },
                //colors: [ '#0000ff', '#ff00ff', '#f7a35c', '#8085e9'],//线条颜色次序

                chart: {
                    height: h,
                    backgroundColor: '#010103',
                    plotBorderWidth: 1,
                    plotBorderColor: '#26262D',
                    events: {
                        load: function () {
                            var Chart = $('#panel').highcharts();
                            var s0 = Chart.series[0];
                            var loadData = function () {

                                var jpath = histor + "?symbol=" + encodeURIComponent(symbolCode) + "&limit=1&resolution=5&codeType=" + codeType + "&st=" + Math.random();

                                $.getJSON(jpath, function (data) {
                                    if (data.t.length == 0) {
                                        // alert("无数据,请检查网络，重新刷新。");
                                        return;
                                    }
                                    var sign = 0;
                                    var today = new Date();
                                    if (today.getTime() > StopTim) { clearTimeout(ChartTimer); } //当前时间大于停盘时间，停止刷新
                                    // alert('异步画图2');

                                    for (i = data.t.length - 1; i >= 0; i--) {
                                        if (data.t[i] >= last_time && data.t[i] < last_time + (7 * 60)) {
                                            var x = Date.parse(getLocalTime(data.t[i])), y1 = parseFloat(eval(data.c[i]));
                                            s0.addPoint([x, y1], false, false);

                                            // if(data.t[i]>last_time)
                                            //{
                                            Chart.redraw();
                                            // }

                                            last_time = data.t[i];
                                            sign++;
                                        }

                                    }
                                })
                            }
                            ChartTimer = setTimeout(loadData, sxtime);
                        }
                    }
                },
                xAxis: {
                    lineColor: '#26262D',
                    gridLineColor: '#26262D',
                    type: 'datetime',
                    min: StartTim, //x轴起始值，要参数
                    max: StopTim, //x轴结束值，要参数

                    dateTimeLabelFormats: {
                        second: '%H:%M:%S',
                        minute: '%H:%M',
                        hour: '%H:%M',
                        day: '%m/%d',
                        week: '%m/%d',
                        month: '%Y/%m',
                        year: '%Y'
                    },

                    tickPixelInterval: 120, //宽度
                    labels: {
                        formatter: function () {
                            return Highcharts.dateFormat('%H:%M', this.value);
                        }
                    }
                },
                yAxis: [{
                    lineColor: '#26262D',
                    gridLineColor: '#26262D',
                    labels: {
                        align: 'right',
                        /*  x: 0,
                        y: 0,*/
                        formatter: function () {
                            if (this.value == prec) {
                                return '<span style="color:#333333;">' + this.value.toFixed(2) + '</span>'
                            } else {
                                return (this.value > prec ? '<span style="color:#ff0000">' + this.value.toFixed(2) + '</span>' : '<span style="color:#1a700e">' + this.value.toFixed(2) + '</span>');
                            }

                        }
                    },
                    plotLines: [{
                        value: prec,
                        color: '#ff5400',
                        dashStyle: 'shortdash',
                        width: 1,
                        label: {
                            text: ''
                        },
                        zIndex: 2
                    }],
                    opposite: false//相反方向
                }
                ],
                plotOptions: {
                    line: {
                        marker: {// hover中为鼠标放在某个点上的样式
                            fillColor: "#888",
                            lineColor: "#000",
                            states:
                            {
                                hover: { enabled: true },
                                select: { enabled: true }
                            }
                        },
                        states: {
                            hover: {
                                enabled: true,
                                lineWidth: 1
                            }
                        }
                    },
                    spline: {
                        enableMouseTracking: false,
                        states: {
                            hover: {
                                enabled: false
                                // lineWidth:1
                            }
                        }
                    }
                },
                //  tooltip: false,
                tooltip: {
                    pointFormat: '<br/><span style="color:#333;">{series.name}</span>:<b>{point.y}</b><br/>',
                    valueDecimals: Digit, //有多少位数显示在每个系列的y值
                    shared: false,
                    xDateFormat: "时间:%Y-%m-%d  %H:%M:%S", //日期的格式在工具提示标提
                    borderColor: '#30527e'
                    // shadow: false
                },

                series: [{
                    name: '当前价',
                    type: 'line',
                    data: Price,
                    color: '#01c8f2',
                    lineWidth: 1,
                    yAxis: 0

                },
                    {
                        name: '昨收价',
                        type: 'spline',
                        data: pline,
                        color: '#ffffff',
                        tooltip: {
                            formatter: function () {
                                var chart = $('#panel').highcharts();
                                var s = Highcharts.dateFormat('<span style="font-size:10px"> %Y-%m-%d  %H:%M:%S</span>', this.x);
                                return s;
                            }
                        },
                        lineWidth: 0.5

                    }]
            });
        }
    });
}

//K线图
function MarketKLine(limit, resolution) {

    Highcharts.theme = {
        xAxis: {
            gridLineWidth: 1
        }
    };

    var Digit = getDecimal(symbolCode.toUpperCase()); //小数位数
    var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
    var dataAll = []; //所有历史数据数组
    var ave5 = []; //五分钟均线
    var ave10 = [];
    var ave30 = [];
    var agent = 0.0000;
    //历史数据路径
    var pathAll = histor + "?symbol=" + encodeURIComponent(symbolCode) + "&limit=" + limit + "&resolution=" + resolution + "&codeType=" + codeType + "&st=" + Math.random();

    $.ajax({
        url: pathAll,
        dataType: 'jsonp',
        jsonp: "callback",
        success: function (data) {
            if (data.t.length == 0) {
                return;
            }

            for (i = data.t.length - 1; i >= 0; i--) {//接口数据存入历史数据数组
                dataAll.push([
                    Date.parse(getLocalTime(data.t[i])), // the date result.t[0]
                    parseFloat(eval(data.o[i])), // open
                    parseFloat(eval(data.h[i])), // high
                    parseFloat(eval(data.l[i])), // low
                    parseFloat(eval(data.c[i])) // close
                ]);
            }
            dataAll.sort(); //按字母先后排序

            for (i = 0; i < dataAll.length; i++) {
                if (i >= 4) {//填充 ave5 均线数据
                    for (var j = i; j >= i - 4; j--) {
                        agent += dataAll[j][4];
                    }
                    ave5.push([
                        dataAll[i][0], // the date
                        agent / 5 // close
                    ]);
                    agent = 0.0000;

                } else {
                    ave5.push([
                        dataAll[i][0], // the date
                        dataAll[i][4]
                    ]);
                }

                if (i >= 9) {//填充 ave10均线数据
                    for (var j = i; j >= i - 9; j--) {
                        agent += dataAll[j][4];
                    }
                    ave10.push([
                        dataAll[i][0], // the date
                        agent / 10 // close
                    ]);
                    agent = 0.0000;

                } else {
                    ave10.push([
                        dataAll[i][0], // the date
                        dataAll[i][4]
                    ]);
                }

                if (i >= 19) {//填充 ave30 均线数据
                    for (var j = i; j >= i - 19; j--) {
                        agent += dataAll[j][4];
                    }
                    ave30.push([
                        dataAll[i][0], // the date
                        agent / 20 // close
                    ]);
                    agent = 0.0000;

                } else {
                    ave30.push([
                        dataAll[i][0], // the date
                        dataAll[i][4]
                    ]);
                }
            }
            //排序
            ave5.sort();
            ave10.sort();
            ave30.sort();

            dataAll.splice(0, (dataAll.length - 81));
            ave5.splice(0, (ave5.length - 81));
            ave10.splice(0, (ave10.length - 81));
            ave30.splice(0, (ave30.length - 81));

            Highcharts.setOptions({
                global: {
                    useUTC: false
                },
                lang: {
                    rangeSelectorZoom: "选择类别",
                    resetZoom: "重置缩放",
                    resetZoomTitle: "复位缩放比例1:1"

                }
            });

            //画图形
            $('#panel').highcharts('StockChart', {
                chart: {
                    height: h,
                    backgroundColor: '#010103',
                    plotBorderWidth: 1,
                    plotBorderColor: '#26262D'
                },
                //colors: ['#33ff33', '#0d233a', '#8bbc21', '#910000', '#1aadce'], //线条颜色次序
                rangeSelector: {
                    inputEnabled: false,
                    enabled: false
                },

                exporting: {
                    enabled: false
                },

                credits: { enabled: false },
                xAxis: {
                    //tickInterval: 60,
                    //   minPadding:0.1,
                    // endOnTick:true,
                    //  maxPadding:StopTim,
                    lineColor: '#26262D',
                    gridLineColor: '#26262D',
                    tickPixelInterval: 128, //宽度
                    labels: {
                        formatter: function () {//?
                            if (resolution == "1" || resolution == "5" || resolution == "15" || resolution == "30" || resolution == "60") {
                                return Highcharts.dateFormat('%m/%d %H:%M', this.value);
                            } else if (resolution == "D") {
                                return Highcharts.dateFormat('%y/%m/%d', this.value);
                            }
                        },
                        style: {
                            color: '#6D869F',
                            fontSize: '12'
                        },
                        rotation: 0,
                        x: 1
                    }
                },
                yAxis: [{
                    lineColor: '#26262D',
                    gridLineColor: '#26262D',
                    labels: {
                        align: 'right',
                        x: 0,
                        y: 0,
                        formatter: function () {
                            return this.value.toFixed(Digit);
                        }
                    },
                    opposite: false//相反方向
                }
                ],
                subtitle: {
                    text: '<span style="color:#11f0c3; margin-right: 6px">5MA</span>' +
                            '<span style="color:#ff4c94; margin-right: 6px">10MA</span>' +
                            '<span style="color:#ffb400; margin-right: 6px">30MA</span>',
                    align: 'left',
                    useHTML: true
                },
                tooltip: {
                    formatter: function () {
                        var chart = $('#panel').highcharts();
                        var s = Highcharts.dateFormat('<span style="font-size:10px"> %Y/%m/%d <br> %H:%M:%S</span>', this.x);
                        $.each(this.points, function (i, point) {
                            s += '<style> table tr td{ border:none; height: 14px;font: "Microsoft YaHei";}</style>   <table>  <tr> <td >开盘:</td> <td style="text-align: right"><b>' + this.point.options.open.toFixed(Digit)
                            + '</b></td> </tr>  <tr><td>最高:</td><td style="text-align: right"><b>' + this.point.options.high.toFixed(Digit)
                            + '</b></td></tr>   <tr><td >最低:</td><td style="text-align: right"><b>' + this.point.options.low.toFixed(Digit)
                            + '</b></td></tr>   <tr> <td>收盘:</td><td style="text-align: right"><b>' + this.point.options.close.toFixed(Digit)
                            + '</b></td></tr></table> ';
                            return false;
                        });
                        return s;
                    },
                    shared: true,
                    useHTML: true,
                    headerFormat: '<small>{point.key}</small><table>', //工具提示的标题
                    pointFormat: '<tr><td style="color: {series.color}">{series.name}: </td>' +
                     '<td style="text-align: right"><b>{point.y} </b></td></tr>', //HTML的点的线在工具提示
                    footerFormat: '</table>',
                    valueDecimals: 2, //有多少位数显示在每个系列的y值
                    xDateFormat: "时间:%Y/%m/%d  %H:%M:%S", //日期的格式在工具提示标提
                    crosshairs: [{ //十字准线
                        color: '#b9b9b0'//颜色
                    }, {
                        color: '#b9b9b0'
                    }]
                },
                navigator: {
                    enabled: false//关闭导航
                },
                scrollbar: {
                    enabled: false//显示滚动条
                },
                plotOptions: {
                    candlestick: {
                        color: '#33ff33',
                        lineColor: '#33ff33',
                        upColor: '#ff2d19',
                        upLineColor: '#ff2d19',
                    },
                    line: {
                        marker: {// hover中为鼠标放在某个点上的样式
                            states:
                         {
                             hover: { enabled: false },
                             select: { enabled: true }
                         }
                        },
                        states: {
                            hover: { enabled: false }
                        }
                    }
                },
                series: [{
                    type: 'candlestick',
                    lineWidth: 1,
                    data: dataAll
                },
                    {
                        type: 'line',
                        lineColor: "#11f0c3",
                        lineWidth: 1,
                        data: ave5
                    }
                    ,
                    {
                        type: 'line',
                        lineColor: "#ff4c94",
                        lineWidth: 1,
                        data: ave10
                    },
                    {
                        type: 'line',
                        lineColor: "#ffb400",
                        lineWidth: 1,
                        data: ave30
                    }

                ]
            });
        }
    });
}